#
#	Makefile for dcmimgle/libsrc
#

@SET_MAKE@

SHELL = /bin/sh
VPATH = @srcdir@:@top_srcdir@/include:@top_srcdir@/@configdir@/include
srcdir = @srcdir@
top_srcdir = @top_srcdir@
configdir = @top_srcdir@/@configdir@

include $(configdir)/@common_makefile@

ofstddir = $(top_srcdir)/../ofstd
oflogdir = $(top_srcdir)/../oflog
dcmdatadir = $(top_srcdir)/../dcmdata

LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include -I$(dcmdatadir)/include
LOCALDEFS =

# Special defines for the Library, define them in LOCALDEFS
#   REVERSE_OVERLAY_ORIGIN_ORDER
#       swap order of overlay origin coordinates

objs = dcmimage.o didocu.o diimage.o diinpx.o diutils.o \
	dimoimg.o dimoimg3.o dimoimg4.o dimoimg5.o \
	dimo1img.o dimo2img.o dimomod.o dimopx.o dimoopx.o \
	diovlay.o diovdat.o diovpln.o diovlimg.o dibaslut.o diluptab.o \
	didispfn.o didislut.o digsdfn.o digsdlut.o diciefn.o dicielut.o

library = libdcmimgle.$(LIBEXT)


all: $(library)

install: $(library)
	$(configdir)/mkinstalldirs $(DESTDIR)$(libdir)
	$(INSTALL_DATA) $(library) $(DESTDIR)$(libdir)/$(library)
	$(RANLIB) $(DESTDIR)$(libdir)/$(library)


$(library): $(objs)
	$(AR) $(ARFLAGS) $@ $(objs)
	$(RANLIB) $@


clean:
	rm -f $(objs) $(library) $(TRASH)

distclean:
	rm -f $(objs) $(library) $(DISTTRASH)


dependencies:
	$(CXX) -MM $(defines) $(includes) $(CPPFLAGS) $(CXXFLAGS) *.cc  > $(DEP)

include $(DEP)
